<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ question.question_text }} - 投票结果</title>
    <style>
        body {
            font-family: 'Helvetica Neue', Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            color: #333;
            line-height: 1.6;
        }
        h1 {
            color: #2c3e50;
            text-align: center;
            margin-bottom: 30px;
            font-weight: 300;
        }
        ul {
            list-style: none;
            padding: 0;
            margin: 0 0 30px 0;
        }
        li {
            margin-bottom: 12px;
            padding: 15px;
            background-color: #f8f9fa;
            border-radius: 4px;
            display: flex;
            justify-content: space-between;
        }
        .vote-count {
            color: #3498db;
            font-weight: bold;
        }
        .button-group {
            display: flex;
            gap: 15px;
            margin-top: 20px;
        }
        .button {
            display: block;
            text-align: center;
            padding: 12px;
            background-color: #3498db;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            transition: background-color 0.3s;
            flex: 1;
        }
        .button:hover {
            background-color: #2980b9;
        }
        .button-secondary {
            background-color: #95a5a6;
        }
        .button-secondary:hover {
            background-color: #7f8c8d;
        }
    </style>
</head>
<body>
    <h1>{{ question.question_text }}</h1>

    <ul>
    {% for choice in question.choice_set.all %}
        <li>
            <span>{{ choice.choice_text }}</span>
            <span class="vote-count">{{ choice.votes }} vote{{ choice.votes|pluralize }}</span>
        </li>
    {% endfor %}
    </ul>

    <div class="button-group">
        <a href="{% url 'polls:index' %}" class="button button-secondary">返回投票首页</a>
        <a href="{% url 'polls:detail' question.id %}" class="button">再次投票</a>
    </div>
</body>
</html>